﻿using System.Collections.Generic;
using DomainModel.PDC;

namespace Application.DTO
{
    public class CustomerInfoMapper
    {
        public IEnumerable<CustomerInfo> From(IEnumerable<Customer> customers)
        {
            foreach (var item in customers)
            {
                yield return From(item);
            }
        }

        public CustomerInfo From(Customer item)
        {
            return new CustomerInfo() {CustomerId = item.CustomerId, FirstName = item.FirstName,  LastName = item.LastName};
        }
    }
}